<% args = params.clone %>

<% if defined?(per_page_action) %>
  <% args[:action] = per_page_action %>
<% end %>

<div class="row index-pagination-row mt-4">
  <div class="col-12 col-sm-9 text-center text-sm-left">
    <%= paginate collection, theme: 'admin-twitter-bootstrap-4' %>
  </div>
  <div class="col-12 col-sm-3 text-center text-sm-left">
    <%= form_tag(per_page_dropdown_params(args), { method: :get, class: 'js-per-page-form form-inline justify-content-center justify-content-sm-end' }) do %>
        <%= per_page_dropdown %>
      <% end %>
  </div>
</div>
